var pillarOptions; // 柱子型
var pillarMOptions; // 柱子型
var lineOption;// 线型
var pieOption;
var totalPillarOptions;
$(function () {
    
    pillarOptions = {
        chart: {
            renderTo: '',
            type: 'column'
        },
        exporting:{ 
            enabled:false //用来设置是否显示‘打印’,'导出'等功能按钮，不设置时默认为显示 
        },
        title: {
            text: ''
        },
        credits:{
            enabled: false
        },
        xAxis: {
            categories: [],
            labels: {
                //                rotation: 0,
                //                align: 'right',
                style: {
                    fontSize: '12px',
                    fontFamily: '"Hiragino Sans GB"'
                }
            }
        },
        plotOptions: {
            line: {
                dataLabels: {
                    enabled: true
                },
                enableMouseTracking: false
            }
        },
        yAxis: {
            title: {
                text: ''
            }
        },
        series: [{
            data:[],
            name:'',
            dataLabels: {
                enabled: true,
                rotation: -90,
                color: '#FFFFFF',
                align: 'center',
                x: 4,
                y: 20,
                style: {
                    fontSize: '10px',
                    fontFamily: 'Hiragino Sans GB'
                }
            }
        },{
            data:[],
            name:'',
            dataLabels: {
                enabled: true,
                rotation: -90,
                color: '#FFFFFF',
                align: 'center',
                x: 4,
                y: 20,
                style: {
                    fontSize: '10px',
                    fontFamily: 'Hiragino Sans GB'
                }
            }
        }]
    };
    pillarMOptions = {
        chart: {
            renderTo: '',
            type: 'column'
        },
        exporting:{ 
            enabled:false //用来设置是否显示‘打印’,'导出'等功能按钮，不设置时默认为显示 
        },
        title: {
            text: ''
        },
        credits:{
            enabled: false
        },
        xAxis: {
            categories: [],
            labels: {
                //                rotation: 0,
                //                align: 'right',
                style: {
                    fontSize: '12px',
                    fontFamily: '"Hiragino Sans GB"'
                }
            }
        },
        plotOptions: {
            line: {
                dataLabels: {
                    enabled: true
                },
                enableMouseTracking: false
            }
        },
        yAxis: {
            title: {
                text: ''
            }
        },
        series: [{
            data:[],
            name:'',
            dataLabels: {
                enabled: true,
                rotation: -90,
                color: '#FFFFFF',
                align: 'center',
                x: 4,
                y: 20,
                style: {
                    fontSize: '10px',
                    fontFamily: 'Hiragino Sans GB'
                }
            }
        },{
            data:[],
            name:'',
            dataLabels: {
                enabled: true,
                rotation: -90,
                color: '#FFFFFF',
                align: 'center',
                x: 4,
                y: 20,
                style: {
                    fontSize: '10px',
                    fontFamily: 'Hiragino Sans GB'
                }
            }
        }]
    };
    lineOption = {
        chart: {
            renderTo: '',
            //alignTicks: false,
            ignoreHiddenSeries: false,
            type: 'spline',
            marginBottom: 100
        },
        exporting:{ 
            enabled:false //用来设置是否显示‘打印’,'导出'等功能按钮，不设置时默认为显示 
        },
        credits: {
            enabled: false
        },
        title: {                            
            text: '',        //图标的标题
            style:{}                        //标题样式
        },
        xAxis: {
            labels: {
                staggerLines: '1'
            }
        },
        yAxis: [{
            title: {
                text: ''
            },
            gridLineWidth: 0
        }],
        legend: {
            layout: 'horizontal',
            backgroundColor: '#FFFFFF',
            floating: true,
            align: 'center',
            //x: 0,
            verticalAlign: 'bottom'
        //y: 0
        },
        tooltip: {
            formatter: function() {
                return '<b>'+ this.x +'</b><br/>'+
                this.series.name +': '+ this.y + '次';
            }
        },
        plotOptions: {
            spline: {
                dataLabels: {
                    enabled: true
                }
            }
        },
        series: [{
            name: '分享数',
            data: []
        }, {
            name: '回流数',
            data: []
        }]
    }; 
    totalPillarOptions = {
        chart: {
            renderTo: '',
            type: 'spline'
        },
        exporting:{ 
            enabled:false //用来设置是否显示‘打印’,'导出'等功能按钮，不设置时默认为显示 
        },
        title: {
            text: ''
        },
        credits:{
            enabled: false
        },
        xAxis: {
            categories: [],
            labels: {
                //                rotation: 0,
                //                align: 'right',
                style: {
                    fontSize: '12px',
                    fontFamily: '"Hiragino Sans GB"'
                }
            }
        },
//        plotOptions: {
//            spline: {
//                dataLabels: {
//                    enabled: false
//                }
//            //enableMouseTracking: true
//            }
//        },
        yAxis: {
            title: {
                text: ''
            }
        },
        tooltip: {
            enabled: true,
            formatter: function() {
                return '<b>'+ this.x +'</b><br/>'+
                this.series.name +': <b>'+ this.y +'</b>';
            }
        },
        series: [{
            name: '开发者',
            data: []
        }, {
            name: '开发者登录',
            data: []
        }, {
            name: '新添加应用',
            data: []
        }, {
            name: 'SDK下载量',
            data: []
        }, {
            name: '分享次数',
            data: []
        }, {
            name: '回流次数',
            data: []
        }, {
            name: '用户数',
            data: []
        }, {
            name: '登录数',
            data: []
        }]
    };
    pieOption = {
        chart: {
            renderTo: '',
            marginLeft: 20
        },
        exporting:{ 
            enabled:false //用来设置是否显示‘打印’,'导出'等功能按钮，不设置时默认为显示 
        },
        credits: {
            enabled: false //右下角版本
        },
        title: {                            
            text: '',        //图标的标题
            style:{}                        //标题样式
        },
        tooltip: {
            pointFormat: '<b>{point.percentage}%</b>',
            percentageDecimals: 1
        },
        plotOptions: {
            pie: {
                allowPointSelect: true,
                shadow: false,
                cursor: 'pointer',
                dataLabels: {
                    enabled: true,
                    color: '#444',
                    style:{
                        fontSize: '12px'
                    },
                    formatter: function() {
                        return '<b>'+ this.point.name +'</b>: '+ this.percentage.toFixed(1) +' %';
                    }
                }
            }
        },



        series: [{
            type: 'pie',
            data:[]
        }]
    };  

});
